<template>
  <div>
   <Card :key='book.id' v-for='book in books' :book='book'></Card>
  </div>
</template>

<script>
import { get } from "@/util";
import Card from "@/components/Card";

export default {
  components: {
    Card
  },
  data() {
    return {
      motto: "1",
      books: []
    };
  },

  methods: {},
  async onShow() {
    const data = await get("/booklist");
    this.books = data.list;
  },
};

</script>

